﻿@page "/employeedetail/{EmployeeId}"
@inherits EmployeeDetailBase

<h1>Details for @Employee.Name</h1>
<h1>单向绑定:</h1>
<div>
    <h2>@Employee.Name</h2>
    <h2>@Employee.BirthDate</h2>
    <h2>@Employee.Gender</h2>
</div>

<div>
    <h3>@Employee.Name</h3>
    <h3>@Employee.BirthDate</h3>
    <h3>@Employee.Gender</h3>
</div>

<hr />

<h1>双向绑定</h1>

<div>
    <h3>Employee Name:</h3>
    <input @bind="@Employee.Name" />
    <h3>Employee BirthDate:</h3>
    <input @bind="@Employee.BirthDate" />
    <h3>Employee Gender:</h3>
    <input @bind="@Employee.Gender" />
</div>

<h2>不同的触发event:</h2>
<div>
    <h3>Employee Name:</h3>
    <input @bind="@Employee.Name" @bind:event="oninput" />
    <h3>Employee BirthDate:</h3>
    <input @bind="@Employee.BirthDate" @bind:event="oninput" />
    <h3>Employee Gender:</h3>
    <input @bind="@Employee.Gender" @bind:event="oninput" />
</div>

<div>
    <button @onclick="Button_Click">Click</button>
</div>